﻿<%@ Page Title="" Language="C#" MasterPageFile="~/User/User.Master" ClientIDMode="Static" AutoEventWireup="true" CodeBehind="JCCDMX_JC_BZX.aspx.cs" Inherits="CoolERP_Web.User.JCCDMX_JC_BZX" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script src="../Scripts/lhgdialog/lhgcore.min.js" type="text/javascript"></script>
<script type="text/javascript">
    var DG = frameElement.lhgDG;
    function MyPreview() {
        CreatePrintPage();
        LODOP.PREVIEW();
    }

    function CreatePrintPage() {
        AddTitle();
        //设置主体内容样式
        var strBodyStyle = "<style>table,tr,td,th { border: 1 solid #000000;border-collapse:collapse }</style>";
        var strFormHtml = strBodyStyle + "<table>" + $("#GridView1").html() + "</table>";
        //主体
        LODOP.ADD_PRINT_HTM(165, 20, 716, 812, strFormHtml);
//        LODOP.ADD_PRINT_TABLE(165, 20, 716, 812, "<table align=center border=1 style='text-align:center border-color:Black'>" + $("#GridView1").html() + "</table>");
        LODOP.ADD_PRINT_LINE(160, 14, 160, 725, 0, 1); //第一条线
        LODOP.ADD_PRINT_LINE(1025, 14, 1025, 725, 0, 1); //第二条线
        LODOP.ADD_PRINT_TEXT(1035, 580, 120, 10, "页号：第#页/共&页");
        LODOP.ADD_PRINT_TEXT(1035, 40, 200, 10, "打印时间：" + (new Date()).toLocaleDateString() + " " + (new Date()).toLocaleTimeString());
        LODOP.SET_PRINT_PAGESIZE(3, 0, 0, "A4");
    };
    function AddTitle() {
        LODOP.PRINT_INIT("打印产品仓库进仓单预览");
        LODOP.ADD_PRINT_TEXT(15, 102, 450, 30, "中山市华盛家具制造有限公司  物料仓库进仓单");
        LODOP.SET_PRINT_STYLEA(1, "FontSize", 13);
        LODOP.SET_PRINT_STYLEA(1, "Bold", 1);
        LODOP.ADD_PRINT_TEXT(70, 15, 200, 20, "验收部门：" + $("#liBMMC").text());
        LODOP.SET_PRINT_STYLEA(2, "FontSize", 10);
        LODOP.SET_PRINT_STYLEA(2, "Bold", 1);
        LODOP.ADD_PRINT_BARCODE(55, 450, 100, 50, "128A", $("#liBH").text());
        LODOP.SET_PRINT_STYLEA(3, "FontSize", 10);
        LODOP.SET_PRINT_STYLEA(3, "Bold", 1);
        LODOP.ADD_PRINT_TEXT(95, 15, 300, 20, "验收人：" + $("#liRYMC").text());
        LODOP.SET_PRINT_STYLEA(4, "FontSize", 10);
        LODOP.SET_PRINT_STYLEA(4, "Bold", 1);
        LODOP.ADD_PRINT_TEXT(120, 15, 500, 20, "进仓时间：" + $("#liRQ").text());
        LODOP.SET_PRINT_STYLEA(5, "FontSize", 10);
        LODOP.SET_PRINT_STYLEA(5, "Bold", 1);
        LODOP.ADD_PRINT_TEXT(145, 15, 500, 20, "进仓原因：" + $("#liReason").text());
        LODOP.SET_PRINT_STYLEA(6, "FontSize", 10);
        LODOP.SET_PRINT_STYLEA(6, "Bold", 1);
    };
    function Setup() {
        CreatePrintPage();
        LODOP.PRINT_SETUP();
    };
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td class=tbHead_L></td>
        <td class=tbHead_M><div><b>进仓单编号：<asp:Label ID="liBH" runat=server/></b></div></td>
        <td class=tbHead_R></td>
    </tr>
    <tr>
        <td class=tbBody_L></td>
        <td class=tbBody_M>
            <ul class=tags style="width:100%;text-align:center">
                <li class=liTitle><div>详细信息</div></li>
                <li class=liRight>状态：<asp:Label ID="liZT" runat=server ForeColor=Red/></li>
            </ul>
            <table class="grvCSS" cellspacing=0 cellpadding=5 border=1 style="width:100%;border-collapse:collapse;">
                <tr>
                    <td style="text-align:right; width:13%">验收部门:</td><td style="text-align:left; width:20%"><asp:Label ID="liBMMC" runat=server/></td>
                    <td style="text-align:right; width:14%">验收人:</td><td style="text-align:left; width:20%"><asp:Label ID="liRYMC" runat=server/></td>
                    <td style="text-align:right; width:13%">进仓原因：</td><td style="text-align:left; width:20%"><asp:Label ID="liReason" runat=server/></td>
                </tr>
                <tr>
                    <td style="text-align:right">进仓时间：</td><td style="text-align:left"><asp:Label ID="liRQ" runat=server/></td>
                    <td style="text-align:right">备注:</td><td style="text-align:left" colspan=3><asp:Label ID="liBZ" runat=server/></td>
                </tr>
            </table>
            <ul class=tags style="width:100%;">
                <li class=liTitle><div>明细列表</div></li>
            </ul>
            <asp:GridView ID="GridView1" runat="server" Width=100% PageSize=1000 ClientIDMode=Static CssClass="grvCSS" AutoGenerateColumns="False" AllowPaging="True">
                <Columns>
                    <asp:TemplateField HeaderText="序号">
                        <ItemTemplate><%# Container.DataItemIndex + 1 %></ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="编号" DataField="BH"/>
                    <asp:BoundField HeaderText="名称" DataField="MC"/>
                    <asp:TemplateField HeaderText="外（长*宽*高）">
                        <ItemTemplate><%# Eval("WChang")%>*<%# Eval("WKuan")%>*<%# Eval("WGao")%></ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="TJ" HeaderText="体积"/>    
                    <asp:BoundField DataField="ZL" HeaderText="重量"/>
                    <asp:BoundField DataField="BZFS" HeaderText="包装方式"/>
                    <asp:BoundField DataField="BZ" HeaderText="备注" />
                    <asp:BoundField HeaderText="进仓数量" DataField="SL"/>
                    <asp:BoundField HeaderText="原库存数量" DataField="YKCSL"/>
                    <asp:BoundField HeaderText="仓库" DataField="CKMC"/>
                    <asp:BoundField HeaderText="仓位" DataField="CWMC"/>
                </Columns>
                <PagerSettings Visible=false />
            </asp:GridView>
            <div style="text-align:center; margin:10px">
            <input type="button" value="打印预览" onclick="MyPreview()" class=btn_s />&nbsp;&nbsp;
            <input type="button" value="打印维护" onclick="Setup()" class=btn_s />&nbsp;&nbsp;
            <input type=image src="../Images/Common/btn_close.png" onclick="DG.cancel();" /></div>
        </td>
        <td class="tbBody_R"></td>
    </tr>
    <tr>
        <td class="tbFoot_L"></td>
        <td class="tbFoot_M"></td>
        <td class="tbFoot_R"></td>
    </tr>
</table>
</asp:Content>
